import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from "./routes"

//1、先在vue中安装router路由
Vue.use(VueRouter);

//2、创建router实例，然后传入‘routers’配置
const router = new VueRouter({
  routes,   //传入写好的路由页面配置
  mode: 'history'  //可以使得页面跳转时不带#号
})

//3、导出路由对象
export default router;